package com.yckj.day04;

/**
 * TODO 一维数组的遍历
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/21 15:03
 */
public class ArrayDemo2 {
    public static void main(String[] args) {
        int[] arr = {12,34,25,67,80};
        // 使用普通for循环遍历
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
        System.out.println();
        // 增强for循环遍历
        for (int ele:arr) {
            System.out.println(ele); // ele是元素值
        }
    }
}
